<template>
<!-- 心里健康 -->
  <div class="tabboxonechildren" v-for="(item, index) in hotdata" :key="index">
          <dl>
            <dt><img src="../../../assets/心里健康.png" alt="" style=" width: 6rem; height: 7.5rem;"></dt>
            <dd>
              <dd>{{item.title}}</dd>
              <dd class="desc">{{item.desc}}</dd>
              <dd style="margin-top: 15px;background:#f7f7f7;width:5rem">{{item.price}}测试</dd>
            </dd>
          </dl>
        </div>
</template>

<script setup>
import { ref} from 'vue'
import http from '@/http/axios.ts'
const hotdata = ref([])
const getData = async () => {
 await http.get('/addres/doctorCY')
    .then((res) => {
      console.log(res)
      hotdata.value = hotdata.value.concat(res.data.data.RECORDS.slice(0,10))
      // console.log(hotdata.value)
    })
    .catch((error) => {
      console.log(error)
    })
}
getData()
</script>

<style>
.tabboxonechildren dl dt{
  width:5rem;
  height: 5rem;
}
.tabboxonechildren dl dd{
    margin-left: 0.8rem;
}
.desc{
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-all;
}
</style>
